<?php

require_once('Interface.php');

class CodeIslands_Api_Service_Template_File_LocaleAware implements CodeIslands_Api_Service_Template_File_Interface
{
	public function getFullTemplatePath($base_dir, $media=null, $language=null, $locale=null, $template_name='ui')
	{
		$full_template_path = $base_dir . '/templates';
		if(isset($media))
			$full_template_path .= '/' . $media;
		if(isset($language))
			$full_template_path .= '/' . $language;
		if(isset($locale))
			$locale .= '/' . $locale;
		
		return "$full_template_path/$template_name.tpl";
	}
}